﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using GenCode128;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.IO;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_HangHoa : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvTKGiaVon")]
        private ADVAccount _AdvTKGiaVon;
        [AccessedThroughProperty("AdvTKHangHoa")]
        private ADVAccount _AdvTKHangHoa;
        [AccessedThroughProperty("browseImageButton")]
        private Button _browseImageButton;
        [AccessedThroughProperty("browseImageOpenFileDialog")]
        private OpenFileDialog _browseImageOpenFileDialog;
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("CboDVT")]
        private ComboBox _CboDVT;
        [AccessedThroughProperty("CboHang")]
        private ComboBox _CboHang;
        [AccessedThroughProperty("CboNganhHang")]
        private ComboBox _CboNganhHang;
        [AccessedThroughProperty("CboNhomHangHoa")]
        private ComboBox _CboNhomHangHoa;
        [AccessedThroughProperty("CboXuatXu")]
        private ComboBox _CboXuatXu;
        [AccessedThroughProperty("CKActive")]
        private CheckBox _CKActive;
        [AccessedThroughProperty("CKBaoHanh")]
        private CheckBox _CKBaoHanh;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdAddRow")]
        private Button _CmdAddRow;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdDelRow")]
        private Button _CmdDelRow;
        [AccessedThroughProperty("CmdDMGia")]
        private Button _CmdDMGia;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdHelp")]
        private ToolStripButton _CmdHelp;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdRemoveImage")]
        private Button _CmdRemoveImage;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("GroupBox3")]
        private GroupBox _GroupBox3;
        [AccessedThroughProperty("GroupBox4")]
        private GroupBox _GroupBox4;
        [AccessedThroughProperty("GroupBox5")]
        private GroupBox _GroupBox5;
        [AccessedThroughProperty("ImgPicture")]
        private PictureBox _ImgPicture;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label14")]
        private Label _Label14;
        [AccessedThroughProperty("Label19")]
        private Label _Label19;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label20")]
        private Label _Label20;
        [AccessedThroughProperty("Label21")]
        private Label _Label21;
        [AccessedThroughProperty("Label22")]
        private Label _Label22;
        [AccessedThroughProperty("Label23")]
        private Label _Label23;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("LinkLabel1")]
        private LinkLabel _LinkLabel1;
        [AccessedThroughProperty("LinkLabel2")]
        private LinkLabel _LinkLabel2;
        [AccessedThroughProperty("LinkLabel3")]
        private LinkLabel _LinkLabel3;
        [AccessedThroughProperty("LinkLabel4")]
        private LinkLabel _LinkLabel4;
        [AccessedThroughProperty("LinkLabel5")]
        private LinkLabel _LinkLabel5;
        [AccessedThroughProperty("OptDichVu")]
        private RadioButton _OptDichVu;
        [AccessedThroughProperty("OptHangHoa")]
        private RadioButton _OptHangHoa;
        [AccessedThroughProperty("pictBarcode")]
        private PictureBox _pictBarcode;
        [AccessedThroughProperty("RdoNguyenlieu")]
        private RadioButton _RdoNguyenlieu;
        [AccessedThroughProperty("RdoThanhpham")]
        private RadioButton _RdoThanhpham;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtBaoHanh")]
        private C1NumericEdit _TxtBaoHanh;
        [AccessedThroughProperty("TxtDienGiai")]
        private TextBox _TxtDienGiai;
        [AccessedThroughProperty("TxtKichThuoc")]
        private TextBox _TxtKichThuoc;
        [AccessedThroughProperty("TxtMa")]
        private TextBox _TxtMa;
        [AccessedThroughProperty("TxtMaHang")]
        private TextBox _TxtMaHang;
        [AccessedThroughProperty("TxtMaThueNhapKhau")]
        private TextBox _TxtMaThueNhapKhau;
        [AccessedThroughProperty("TxtMaVach")]
        private TextBox _TxtMaVach;
        [AccessedThroughProperty("TxtTenAnh")]
        private TextBox _TxtTenAnh;
        [AccessedThroughProperty("TxtTenViet")]
        private TextBox _TxtTenViet;
        [AccessedThroughProperty("TxtTonToiThieu")]
        private C1NumericEdit _TxtTonToiThieu;
        [AccessedThroughProperty("TxtTrongLuong")]
        private C1NumericEdit _TxtTrongLuong;
        [AccessedThroughProperty("TxtTyLeThue")]
        private C1NumericEdit _TxtTyLeThue;
        [AccessedThroughProperty("TxttyLeThueNK")]
        private C1NumericEdit _TxttyLeThueNK;
        [AccessedThroughProperty("VSDonViTinh")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSDonViTinh;
        [AccessedThroughProperty("VSGiaBan")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSGiaBan;
        public bool bLoaded;
        public string cFrmKhoa;
        private string cFrmKhoaOld;
        public string cFrmTask;
        private IContainer components;
        private bool IsLoaded;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnabledControl;
        private Image MyImg;
        private clsDMChiTietDonViTinh objDMCTDVT;
        public object objFrmCall;
        private clsDMHangHoa objHH;
        private clsThuocTinhHangHoa objTT;
        private DataView pData;

        public Frm_HangHoa()
        {
            base.KeyDown += new KeyEventHandler(this.Frm_HangHoa_KeyDown);
            base.Load += new EventHandler(this.Frm_HangHoa_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmKhoaOld = "";
            this.cFrmKhoa = "";
            this.cFrmTask = "";
            this.mAllowEdit = true;
            this.mAllowDel = true;
            this.objHH = new clsDMHangHoa();
            this.objDMCTDVT = new clsDMChiTietDonViTinh();
            this.bLoaded = false;
            this.objTT = new clsThuocTinhHangHoa();
            this.IsLoaded = false;
            this.InitializeComponent();
        }

        private void browseImageButton_Click(object sender, EventArgs e)
        {
            this.browseImageOpenFileDialog.Title = "Select an Image to Import";
            this.browseImageOpenFileDialog.Multiselect = false;
            this.browseImageOpenFileDialog.Filter = "JPEG Compressed Image(*.jpg)|*.jpg";
            this.browseImageOpenFileDialog.FilterIndex = 2;
            this.browseImageOpenFileDialog.FileName = "";
            if (this.browseImageOpenFileDialog.ShowDialog() == DialogResult.OK)
            {
                this.ImgPicture.Tag = this.browseImageOpenFileDialog.FileName;
                this.ImgPicture.Image = Image.FromFile(this.browseImageOpenFileDialog.FileName);
            }
        }

        private void C1DockingTab1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.mEnabledControl)
            {
            }
        }

        private void CboNganhHang_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNganhHang.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                this.CboNhomHangHoa.DataSource = null;
            }
            else
            {
                BuildComboModule.BuildCombo(this.CboNhomHangHoa, modGeneral.ListDanhMuc.NhomHangHoa, false, Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(" KhoaNganh = '", this.CboNganhHang.SelectedValue), "'")), "");
            }
        }

        private void CboNhomHangHoa_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNhomHangHoa.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
            {
                clsDMNhomHangHoa hoa = new clsDMNhomHangHoa();
                hoa.Load(Conversions.ToString(this.CboNhomHangHoa.SelectedValue));
                this.AdvTKHangHoa.Value = hoa.KhoaTKHangHoa;
                this.AdvTKGiaVon.Value = hoa.KhoaTKGiaVon;
            }
        }

        public bool CheckIvalid()
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNganhHang.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p ng\x00e0nh h\x00e0ng!", ""));
                this.CboNganhHang.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNhomHangHoa.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p nh\x00f3m h\x00e0ng!", ""));
                this.CboNhomHangHoa.Focus();
                return false;
            }
            if (this.TxtMa.Text.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p mã h\x00e0ng h\x00f3a!", ""));
                this.TxtMa.Focus();
                return false;
            }
            if (this.TxtTenViet.Text.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p t\x00ean h\x00e0ng h\x00f3a!", ""));
                this.TxtTenViet.Focus();
                return false;
            }
            if (this.objHH.isDupplicateCode(this.cFrmKhoa, this.TxtMa.Text.Trim()))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Mã này đã t\x00f4̀n tại. Bạn phải nh\x00e2̣p mã khác", ""));
                this.TxtMa.Focus();
                return false;
            }
            if ((this.TxtTenViet.Text.Trim() == "") & (this.TxtTenAnh.Text.Trim() == ""))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p t\x00ean!", ""));
                this.TxtTenViet.Focus();
                return false;
            }
            if (this.AdvTKHangHoa.Value.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p t\x00e0i khoản h\x00e0ng h\x00f3a!", ""));
                this.AdvTKHangHoa.Focus();
                return false;
            }
            if (this.AdvTKGiaVon.Value.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nh\x00e2̣p t\x00e0i khoản gi\x00e1 vốn!", ""));
                this.AdvTKGiaVon.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboDVT.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập đơn vị t\x00ednh!", ""));
                this.CboDVT.Focus();
                return false;
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
            }
            this.EmptyData();
            this.C1DockingTab1.SelectedIndex = 0;
            this.EnableControl = true;
            this.CboNhomHangHoa.Focus();
        }

        private void CmdAddRow_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_AddDonViTinh.cFrmKhoaHangHoa = this.cFrmKhoa;
            MyProject.Forms.Frm_AddDonViTinh.ShowDialog();
            this.LoadDonViTinh();
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if (this.objHH.WasUsed(this.cFrmKhoa))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Dữ liệu đ\x00e3 được sử dụng, bạn kh\x00f4ng thể x\x00f3a!", ""));
            }
            else if (((LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "") && LVYModule.ConfirmDelete("")) && this.objHH.Delete(this.cFrmKhoa))
            {
                this.EmptyData();
            }
        }

        private void CmdDelRow_Click(object sender, EventArgs e)
        {
            if ((this.VSDonViTinh.Rows.Count != 1) && (this.VSDonViTinh.Row > 0))
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSDonViTinh[this.VSDonViTinh.Row, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng thể x\x00f3a đơn vị t\x00ednh lưu kho được. Bạn c\x00f3 thể chỉnh sửa bằng c\x00e1ch sửa th\x00f4ng tin chung h\x00e0ng h\x00f3a!", ""));
                }
                else if (this.objDMCTDVT.Delete(Conversions.ToString(this.VSDonViTinh[this.VSDonViTinh.Row, 0])))
                {
                    this.VSDonViTinh.RemoveItem(this.VSDonViTinh.Row);
                }
            }
        }

        private void CmdDMGia_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_DMLoaiGia.ShowDialog();
            this.LoadGiaBan(this.cFrmKhoa);
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            this.cFrmKhoaOld = this.cFrmKhoa;
            this.EnableControl = true;
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                if (this.objFrmCall != null)
                {
                    TextBox txtMa;
                    object[] objArray;
                    object[] objArray2;
                    bool[] flagArray;
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        objArray = new object[3];
                        objArray[0] = this.cFrmKhoa;
                        txtMa = this.TxtMa;
                        objArray[1] = txtMa.Text;
                        objArray[2] = this.TxtTenViet.Text.Trim();
                        objArray2 = objArray;
                        flagArray = new bool[] { true, true, false };
                        NewLateBinding.LateCall(this.objFrmCall, null, "InsertHangHoa", objArray2, null, null, flagArray, true);
                        if (flagArray[0])
                        {
                            this.cFrmKhoa = (string) Conversions.ChangeType(RuntimeHelpers.GetObjectValue(objArray2[0]), typeof(string));
                        }
                        if (flagArray[1])
                        {
                            txtMa.Text = (string) Conversions.ChangeType(RuntimeHelpers.GetObjectValue(objArray2[1]), typeof(string));
                        }
                    }
                    else
                    {
                        objArray2 = new object[3];
                        objArray2[0] = this.cFrmKhoa;
                        txtMa = this.TxtMa;
                        objArray2[1] = txtMa.Text;
                        objArray2[2] = this.TxtTenAnh.Text.Trim();
                        objArray = objArray2;
                        flagArray = new bool[] { true, true, false };
                        NewLateBinding.LateCall(this.objFrmCall, null, "InsertHangHoa", objArray, null, null, flagArray, true);
                        if (flagArray[0])
                        {
                            this.cFrmKhoa = (string) Conversions.ChangeType(RuntimeHelpers.GetObjectValue(objArray[0]), typeof(string));
                        }
                        if (flagArray[1])
                        {
                            txtMa.Text = (string) Conversions.ChangeType(RuntimeHelpers.GetObjectValue(objArray[1]), typeof(string));
                        }
                    }
                }
                this.cFrmKhoa = "";
            }
            this.Dispose();
        }

        private void CmdHelp_Click(object sender, EventArgs e)
        {
            LVYModule.ShowHelp(@"DANHMUCDUNGCHUNG\DANHMUC\HANGHOANGUYENPHULIEU.mht");
        }

        private void CmdPrint_Click(object sender, EventArgs e)
        {
        }

        private void CmdRemoveImage_Click(object sender, EventArgs e)
        {
            this.ImgPicture.Image = null;
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalid())
            {
                this.objHH.KhoaNganh = Conversions.ToString(this.CboNganhHang.SelectedValue);
                this.objHH.KhoaNhom = Conversions.ToString(this.CboNhomHangHoa.SelectedValue);
                this.objHH.Khoa = this.cFrmKhoa;
                this.objHH.Ma = this.TxtMa.Text;
                this.objHH.MaVach = this.TxtMaVach.Text;
                this.objHH.TenViet = this.TxtTenViet.Text;
                this.objHH.TenAnh = this.TxtTenAnh.Text;
                this.objHH.DienGiai = this.TxtDienGiai.Text;
                this.objHH.KhoaDonViTinh = Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboDVT.SelectedValue), "", modGeneral.TypeOfValue.String));
                this.objHH.TrongLuong = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTrongLuong.Value), 0, modGeneral.TypeOfValue.Nothing));
                this.objHH.ThongSoKythuat = this.TxtKichThuoc.Text;
                this.objHH.TyLeThue = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTyLeThue.Value), 0, modGeneral.TypeOfValue.Nothing));
                this.objHH.MaHangNhapKhau = this.TxtMaThueNhapKhau.Text;
                this.objHH.KhoaQuocGia = Conversions.ToString(this.CboXuatXu.SelectedValue);
                this.objHH.MaTheoHang = this.TxtMaHang.Text.Trim();
                this.objHH.TyLeThueNhapKhau = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxttyLeThueNK.Value), 0, modGeneral.TypeOfValue.Nothing));
                if (this.TxtTonToiThieu.Text == "")
                {
                    this.objHH.SoLuongTonToiThieu = 0.0;
                }
                else
                {
                    this.objHH.SoLuongTonToiThieu = Conversions.ToDouble(Conversions.ToInteger(this.TxtTonToiThieu.Value).ToString());
                }
                this.objHH.KhoaHangSanXuat = Conversions.ToString(this.CboHang.SelectedValue);
                if (this.TxtBaoHanh.Text == "")
                {
                    this.objHH.ThoiGianBaoHanh = 0;
                }
                else
                {
                    this.objHH.ThoiGianBaoHanh = Conversions.ToInteger(this.TxtBaoHanh.Text);
                }
                if (this.RdoNguyenlieu.Checked)
                {
                    this.objHH.NguyenLieu = 1;
                }
                else
                {
                    this.objHH.NguyenLieu = 0;
                }
                if (this.RdoThanhpham.Checked)
                {
                    this.objHH.ThanhPham = 1;
                }
                else
                {
                    this.objHH.ThanhPham = 0;
                }
                if (this.CKBaoHanh.CheckState == CheckState.Checked)
                {
                    this.objHH.TheoDoiBaoHanh = 1;
                }
                else
                {
                    this.objHH.TheoDoiBaoHanh = 0;
                }
                if (this.CKActive.CheckState == CheckState.Checked)
                {
                    this.objHH.Active = 1;
                }
                else
                {
                    this.objHH.Active = 0;
                }
                this.objHH.KhoaTKHangHoa = this.AdvTKHangHoa.Value;
                this.objHH.KhoaTKGiaVon = this.AdvTKGiaVon.Value;
                if (this.OptDichVu.Checked)
                {
                    this.objHH.Loai = "DV";
                }
                else
                {
                    this.objHH.Loai = "HH";
                }
                MemoryStream stream = new MemoryStream();
                if (this.ImgPicture.Image != null)
                {
                    this.ImgPicture.Image.Save(stream, this.ImgPicture.Image.RawFormat);
                    byte[] buffer = stream.GetBuffer();
                    this.objHH.Img = buffer;
                }
                else
                {
                    this.objHH.Img = null;
                }
                if (this.objHH.Save())
                {
                    this.EnableControl = false;
                    this.LoadDonViTinh();
                    this.LoadThuocTinh(this.cFrmKhoa);
                }
            }
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaOld, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoa = this.cFrmKhoaOld;
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
            }
            this.EnableControl = false;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.cFrmKhoa = modGeneral.CreatKey("DM_HangHoa", 10, "");
            this.cFrmTask = "I";
            this.CboNhomHangHoa.SelectedValue = "";
            this.TxtMa.Text = "";
            this.TxtMaVach.Text = "";
            this.TxtTenViet.Text = "";
            this.TxtTenAnh.Text = "";
            this.TxtDienGiai.Text = "";
            this.CboDVT.SelectedValue = "";
            this.TxtTonToiThieu.Value = 0;
            this.CboHang.SelectedValue = "";
            this.TxtBaoHanh.Value = 0;
            this.AdvTKHangHoa.Value = "";
            this.AdvTKGiaVon.Value = "";
            this.VSDonViTinh.Rows.Count = 1;
            this.TxtTrongLuong.Value = 0;
            this.TxtTyLeThue.Value = 0;
            this.TxtKichThuoc.Text = "";
            this.TxtMaThueNhapKhau.Text = "";
            this.CboXuatXu.SelectedValue = "";
            this.TxttyLeThueNK.Value = 0;
            this.CKBaoHanh.Checked = false;
            this.CboNhomHangHoa.Focus();
            this.CKActive.CheckState = CheckState.Checked;
        }

        private void Frm_HangHoa_KeyDown(object sender, KeyEventArgs e)
        {
            Keys keyCode = e.KeyCode;
            if (keyCode == Keys.F1)
            {
                LVYModule.ShowHelp(@"DANHMUCDUNGCHUNG\DANHMUC\HANGHOANGUYENPHULIEU.mht");
            }
            else if (keyCode == Keys.F2)
            {
                if (this.CmdEdit.Enabled)
                {
                    this.CmdEdit_Click(this, e);
                }
            }
            else if (keyCode == Keys.F8)
            {
                if (this.CmdAdd.Enabled)
                {
                    this.CmdAdd_Click(this, e);
                }
            }
            else if (keyCode == Keys.F9)
            {
                if (this.CmdDel.Enabled)
                {
                    this.CmdDel_Click(this, e);
                }
            }
            else if (keyCode == Keys.F10)
            {
                if (this.CmdSave.Enabled)
                {
                    this.CmdSave_Click(this, e);
                }
            }
            else if (keyCode == Keys.F11)
            {
                if (this.CmdUnsave.Enabled)
                {
                    this.CmdUnsave_Click(this, e);
                }
            }
            else if (keyCode == Keys.F12)
            {
                if (this.CmdPrint.Enabled)
                {
                    this.CmdPrint_Click(this, e);
                }
            }
            else if ((keyCode == Keys.Escape) && this.CmdExit.Enabled)
            {
                this.CmdExit_Click(this, e);
            }
        }

        private void Frm_HangHoa_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.IsLoaded = false;
                BuildComboModule.BuildCombo(this.CboDVT, modGeneral.ListDanhMuc.DonViTinh, false, "", "");
                BuildComboModule.BuildCombo(this.CboNhomHangHoa, modGeneral.ListDanhMuc.NhomHangHoa, false, "", "");
                BuildComboModule.BuildCombo(this.CboNganhHang, modGeneral.ListDanhMuc.NganhHang, false, "", "");
                BuildComboModule.BuildCombo(this.CboHang, modGeneral.ListDanhMuc.HangSanXuat, true, "", "");
                BuildComboModule.BuildCombo(this.CboXuatXu, modGeneral.ListDanhMuc.QuocGia, true, "", "");
                this.IsLoaded = true;
                this.EnableControl = false;
                if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.ShowData(this.cFrmKhoa);
                }
                if (this.cFrmTask == "I")
                {
                    this.CmdAdd_Click(this, e);
                }
                if (this.cFrmTask == "U")
                {
                    this.CmdEdit_Click(this, e);
                }
                this.C1DockingTab1.SelectedIndex = 0;
                this.Cursor = Cursors.Default;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_HangHoa));
            this.GroupBox5 = new GroupBox();
            this.CmdDMGia = new Button();
            this.VSGiaBan = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.GroupBox3 = new GroupBox();
            this.CmdDelRow = new Button();
            this.CmdAddRow = new Button();
            this.VSDonViTinh = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.GroupBox4 = new GroupBox();
            this.LinkLabel4 = new LinkLabel();
            this.LinkLabel2 = new LinkLabel();
            this.LinkLabel1 = new LinkLabel();
            this.CKActive = new CheckBox();
            this.CKBaoHanh = new CheckBox();
            this.CboHang = new ComboBox();
            this.TxtBaoHanh = new C1NumericEdit();
            this.TxttyLeThueNK = new C1NumericEdit();
            this.TxtTyLeThue = new C1NumericEdit();
            this.TxtTonToiThieu = new C1NumericEdit();
            this.TxtTrongLuong = new C1NumericEdit();
            this.CboXuatXu = new ComboBox();
            this.Label21 = new Label();
            this.TxtKichThuoc = new TextBox();
            this.Label20 = new Label();
            this.Label19 = new Label();
            this.RdoThanhpham = new RadioButton();
            this.RdoNguyenlieu = new RadioButton();
            this.Label14 = new Label();
            this.Label13 = new Label();
            this.CboDVT = new ComboBox();
            this.Label6 = new Label();
            this.Label5 = new Label();
            this.Label23 = new Label();
            this.GroupBox1 = new GroupBox();
            this.LinkLabel5 = new LinkLabel();
            this.LinkLabel3 = new LinkLabel();
            this.CmdRemoveImage = new Button();
            this.browseImageButton = new Button();
            this.ImgPicture = new PictureBox();
            this.OptDichVu = new RadioButton();
            this.OptHangHoa = new RadioButton();
            this.Label7 = new Label();
            this.TxtMaHang = new TextBox();
            this.pictBarcode = new PictureBox();
            this.CboNganhHang = new ComboBox();
            this.Label22 = new Label();
            this.TxtMaThueNhapKhau = new TextBox();
            this.Label11 = new Label();
            this.TxtMaVach = new TextBox();
            this.CboNhomHangHoa = new ComboBox();
            this.Label4 = new Label();
            this.TxtDienGiai = new TextBox();
            this.Label3 = new Label();
            this.TxtTenAnh = new TextBox();
            this.Label2 = new Label();
            this.TxtTenViet = new TextBox();
            this.Label1 = new Label();
            this.TxtMa = new TextBox();
            this.ToolStrip1 = new ToolStrip();
            this.CmdAdd = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdSave = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.CmdFind = new ToolStripButton();
            this.CmdPrint = new ToolStripButton();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.CmdHelp = new ToolStripButton();
            this.browseImageOpenFileDialog = new OpenFileDialog();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.AdvTKGiaVon = new ADVAccount();
            this.AdvTKHangHoa = new ADVAccount();
            this.GroupBox5.SuspendLayout();
            this.VSGiaBan.BeginInit();
            this.GroupBox3.SuspendLayout();
            this.VSDonViTinh.BeginInit();
            this.GroupBox4.SuspendLayout();
            ((ISupportInitialize) this.TxtBaoHanh).BeginInit();
            ((ISupportInitialize) this.TxttyLeThueNK).BeginInit();
            ((ISupportInitialize) this.TxtTyLeThue).BeginInit();
            ((ISupportInitialize) this.TxtTonToiThieu).BeginInit();
            ((ISupportInitialize) this.TxtTrongLuong).BeginInit();
            this.GroupBox1.SuspendLayout();
            ((ISupportInitialize) this.ImgPicture).BeginInit();
            ((ISupportInitialize) this.pictBarcode).BeginInit();
            this.ToolStrip1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            this.C1DockingTabPage2.SuspendLayout();
            this.SuspendLayout();
            this.GroupBox5.BackColor = Color.Transparent;
            this.GroupBox5.Controls.Add(this.CmdDMGia);
            this.GroupBox5.Controls.Add(this.VSGiaBan);
            this.GroupBox5.Dock = DockStyle.Fill;
            Point point = new Point(0x176, 0);
            this.GroupBox5.Location = point;
            this.GroupBox5.Name = "GroupBox5";
            Size size = new Size(0x175, 0x1b4);
            this.GroupBox5.Size = size;
            this.GroupBox5.TabIndex = 0x2f;
            this.GroupBox5.TabStop = false;
            this.GroupBox5.Text = "Gi\x00e1 b\x00e1n";
            this.CmdDMGia.Image = ACCOUNTING.My.Resources.Resources.Adds;
            this.CmdDMGia.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(6, 0x197);
            this.CmdDMGia.Location = point;
            this.CmdDMGia.Name = "CmdDMGia";
            size = new Size(110, 0x19);
            this.CmdDMGia.Size = size;
            this.CmdDMGia.TabIndex = 0x2e;
            this.CmdDMGia.Text = "&Danh mục gi\x00e1";
            this.CmdDMGia.UseVisualStyleBackColor = true;
            this.VSGiaBan.AutoResize = false;
            this.VSGiaBan.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSGiaBan.ColumnInfo = manager.GetString("VSGiaBan.ColumnInfo");
            this.VSGiaBan.Dock = DockStyle.Top;
            this.VSGiaBan.ExtendLastCol = true;
            point = new Point(3, 0x10);
            this.VSGiaBan.Location = point;
            this.VSGiaBan.Name = "VSGiaBan";
            this.VSGiaBan.Rows.Count = 1;
            this.VSGiaBan.Rows.DefaultSize = 0x11;
            size = new Size(0x16f, 0x181);
            this.VSGiaBan.Size = size;
            this.VSGiaBan.StyleInfo = manager.GetString("VSGiaBan.StyleInfo");
            this.VSGiaBan.TabIndex = 0x2d;
            this.GroupBox3.BackColor = Color.Transparent;
            this.GroupBox3.Controls.Add(this.CmdDelRow);
            this.GroupBox3.Controls.Add(this.CmdAddRow);
            this.GroupBox3.Controls.Add(this.VSDonViTinh);
            this.GroupBox3.Dock = DockStyle.Left;
            point = new Point(0, 0);
            this.GroupBox3.Location = point;
            this.GroupBox3.Name = "GroupBox3";
            size = new Size(0x176, 0x1b4);
            this.GroupBox3.Size = size;
            this.GroupBox3.TabIndex = 0x2e;
            this.GroupBox3.TabStop = false;
            this.GroupBox3.Text = "Đơn vị t\x00ednh";
            this.CmdDelRow.Image = ACCOUNTING.My.Resources.Resources.Remove;
            this.CmdDelRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x55, 0x197);
            this.CmdDelRow.Location = point;
            this.CmdDelRow.Name = "CmdDelRow";
            size = new Size(0x4b, 0x19);
            this.CmdDelRow.Size = size;
            this.CmdDelRow.TabIndex = 0x2f;
            this.CmdDelRow.Text = "X\x00f3a";
            this.CmdDelRow.UseVisualStyleBackColor = true;
            this.CmdAddRow.Image = ACCOUNTING.My.Resources.Resources.Adds;
            this.CmdAddRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(5, 0x197);
            this.CmdAddRow.Location = point;
            this.CmdAddRow.Name = "CmdAddRow";
            size = new Size(0x4d, 0x19);
            this.CmdAddRow.Size = size;
            this.CmdAddRow.TabIndex = 0x2e;
            this.CmdAddRow.Text = "Th\x00eam";
            this.CmdAddRow.UseVisualStyleBackColor = true;
            this.VSDonViTinh.AllowEditing = false;
            this.VSDonViTinh.AutoResize = false;
            this.VSDonViTinh.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSDonViTinh.ColumnInfo = manager.GetString("VSDonViTinh.ColumnInfo");
            this.VSDonViTinh.Dock = DockStyle.Top;
            this.VSDonViTinh.ExtendLastCol = true;
            point = new Point(3, 0x10);
            this.VSDonViTinh.Location = point;
            this.VSDonViTinh.Name = "VSDonViTinh";
            this.VSDonViTinh.Rows.Count = 1;
            this.VSDonViTinh.Rows.DefaultSize = 0x11;
            size = new Size(0x170, 0x181);
            this.VSDonViTinh.Size = size;
            this.VSDonViTinh.StyleInfo = manager.GetString("VSDonViTinh.StyleInfo");
            this.VSDonViTinh.TabIndex = 0x2d;
            this.GroupBox4.BackColor = Color.Transparent;
            this.GroupBox4.Controls.Add(this.LinkLabel4);
            this.GroupBox4.Controls.Add(this.LinkLabel2);
            this.GroupBox4.Controls.Add(this.LinkLabel1);
            this.GroupBox4.Controls.Add(this.CKActive);
            this.GroupBox4.Controls.Add(this.CKBaoHanh);
            this.GroupBox4.Controls.Add(this.CboHang);
            this.GroupBox4.Controls.Add(this.TxtBaoHanh);
            this.GroupBox4.Controls.Add(this.TxttyLeThueNK);
            this.GroupBox4.Controls.Add(this.TxtTyLeThue);
            this.GroupBox4.Controls.Add(this.TxtTonToiThieu);
            this.GroupBox4.Controls.Add(this.TxtTrongLuong);
            this.GroupBox4.Controls.Add(this.CboXuatXu);
            this.GroupBox4.Controls.Add(this.Label21);
            this.GroupBox4.Controls.Add(this.TxtKichThuoc);
            this.GroupBox4.Controls.Add(this.Label20);
            this.GroupBox4.Controls.Add(this.Label19);
            this.GroupBox4.Controls.Add(this.RdoThanhpham);
            this.GroupBox4.Controls.Add(this.RdoNguyenlieu);
            this.GroupBox4.Controls.Add(this.Label14);
            this.GroupBox4.Controls.Add(this.Label13);
            this.GroupBox4.Controls.Add(this.CboDVT);
            this.GroupBox4.Controls.Add(this.Label6);
            this.GroupBox4.Controls.Add(this.AdvTKGiaVon);
            this.GroupBox4.Controls.Add(this.AdvTKHangHoa);
            this.GroupBox4.Controls.Add(this.Label5);
            this.GroupBox4.Controls.Add(this.Label23);
            point = new Point(2, 0xff);
            this.GroupBox4.Location = point;
            this.GroupBox4.Name = "GroupBox4";
            size = new Size(0x2e5, 0xaf);
            this.GroupBox4.Size = size;
            this.GroupBox4.TabIndex = 1;
            this.GroupBox4.TabStop = false;
            this.GroupBox4.Text = "Thuộc t\x00ednh";
            this.LinkLabel4.AutoSize = true;
            point = new Point(10, 0x9a);
            this.LinkLabel4.Location = point;
            this.LinkLabel4.Name = "LinkLabel4";
            size = new Size(60, 13);
            this.LinkLabel4.Size = size;
            this.LinkLabel4.TabIndex = 10;
            this.LinkLabel4.TabStop = true;
            this.LinkLabel4.Text = "Đơn vị t\x00ednh";
            this.LinkLabel2.AutoSize = true;
            point = new Point(8, 0x34);
            this.LinkLabel2.Location = point;
            this.LinkLabel2.Name = "LinkLabel2";
            size = new Size(0x2b, 13);
            this.LinkLabel2.Size = size;
            this.LinkLabel2.TabIndex = 2;
            this.LinkLabel2.TabStop = true;
            this.LinkLabel2.Text = "Xuất xứ";
            this.LinkLabel1.AutoSize = true;
            point = new Point(7, 0x19);
            this.LinkLabel1.Location = point;
            this.LinkLabel1.Name = "LinkLabel1";
            size = new Size(0x4c, 13);
            this.LinkLabel1.Size = size;
            this.LinkLabel1.TabIndex = 0;
            this.LinkLabel1.TabStop = true;
            this.LinkLabel1.Text = "H\x00e3ng sản xuất";
            this.CKActive.AutoSize = true;
            this.CKActive.Checked = true;
            this.CKActive.CheckState = CheckState.Checked;
            point = new Point(0x211, 0x99);
            this.CKActive.Location = point;
            this.CKActive.Name = "CKActive";
            size = new Size(0x38, 0x11);
            this.CKActive.Size = size;
            this.CKActive.TabIndex = 0x16;
            this.CKActive.Text = "Active";
            this.CKActive.UseVisualStyleBackColor = true;
            this.CKBaoHanh.AutoSize = true;
            this.CKBaoHanh.Checked = true;
            this.CKBaoHanh.CheckState = CheckState.Checked;
            point = new Point(0x6d, 0xec);
            this.CKBaoHanh.Location = point;
            this.CKBaoHanh.Name = "CKBaoHanh";
            size = new Size(0x74, 0x11);
            this.CKBaoHanh.Size = size;
            this.CKBaoHanh.TabIndex = 0x54;
            this.CKBaoHanh.Text = "Theo dõi bảo hành";
            this.CKBaoHanh.UseVisualStyleBackColor = true;
            this.CboHang.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboHang.FormattingEnabled = true;
            point = new Point(0x6d, 0x16);
            this.CboHang.Location = point;
            this.CboHang.Name = "CboHang";
            size = new Size(0x11b, 0x15);
            this.CboHang.Size = size;
            this.CboHang.TabIndex = 1;
            this.TxtBaoHanh.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0x211, 0x17);
            this.TxtBaoHanh.Location = point;
            this.TxtBaoHanh.Name = "TxtBaoHanh";
            Padding padding = new Padding(1);
            this.TxtBaoHanh.Padding = padding;
            size = new Size(90, 20);
            this.TxtBaoHanh.Size = size;
            this.TxtBaoHanh.TabIndex = 13;
            this.TxtBaoHanh.Tag = null;
            this.TxtBaoHanh.VisibleButtons = DropDownControlButtonFlags.UpDown;
            this.TxtBaoHanh.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtBaoHanh.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxttyLeThueNK.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0x211, 0x49);
            this.TxttyLeThueNK.Location = point;
            this.TxttyLeThueNK.Name = "TxttyLeThueNK";
            padding = new Padding(1);
            this.TxttyLeThueNK.Padding = padding;
            size = new Size(90, 20);
            this.TxttyLeThueNK.Size = size;
            this.TxttyLeThueNK.TabIndex = 0x11;
            this.TxttyLeThueNK.Tag = null;
            this.TxttyLeThueNK.VisibleButtons = DropDownControlButtonFlags.UpDown;
            this.TxttyLeThueNK.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxttyLeThueNK.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTyLeThue.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0x211, 0x31);
            this.TxtTyLeThue.Location = point;
            this.TxtTyLeThue.Name = "TxtTyLeThue";
            padding = new Padding(1);
            this.TxtTyLeThue.Padding = padding;
            size = new Size(90, 20);
            this.TxtTyLeThue.Size = size;
            this.TxtTyLeThue.TabIndex = 15;
            this.TxtTyLeThue.Tag = null;
            this.TxtTyLeThue.VisibleButtons = DropDownControlButtonFlags.UpDown;
            this.TxtTyLeThue.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTyLeThue.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTonToiThieu.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0x211, 0x7e);
            this.TxtTonToiThieu.Location = point;
            this.TxtTonToiThieu.Name = "TxtTonToiThieu";
            padding = new Padding(1);
            this.TxtTonToiThieu.Padding = padding;
            size = new Size(90, 20);
            this.TxtTonToiThieu.Size = size;
            this.TxtTonToiThieu.TabIndex = 0x15;
            this.TxtTonToiThieu.Tag = null;
            this.TxtTonToiThieu.VisibleButtons = DropDownControlButtonFlags.UpDown;
            this.TxtTonToiThieu.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTonToiThieu.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTrongLuong.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0x211, 0x63);
            this.TxtTrongLuong.Location = point;
            this.TxtTrongLuong.Name = "TxtTrongLuong";
            padding = new Padding(1);
            this.TxtTrongLuong.Padding = padding;
            size = new Size(90, 20);
            this.TxtTrongLuong.Size = size;
            this.TxtTrongLuong.TabIndex = 0x13;
            this.TxtTrongLuong.Tag = null;
            this.TxtTrongLuong.VisibleButtons = DropDownControlButtonFlags.UpDown;
            this.TxtTrongLuong.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTrongLuong.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.CboXuatXu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboXuatXu.FormattingEnabled = true;
            point = new Point(0x6d, 0x30);
            this.CboXuatXu.Location = point;
            this.CboXuatXu.Name = "CboXuatXu";
            size = new Size(0x11b, 0x15);
            this.CboXuatXu.Size = size;
            this.CboXuatXu.TabIndex = 3;
            this.Label21.AutoSize = true;
            point = new Point(0x1a5, 0x34);
            this.Label21.Location = point;
            this.Label21.Name = "Label21";
            size = new Size(0x4f, 13);
            this.Label21.Size = size;
            this.Label21.TabIndex = 14;
            this.Label21.Text = "Thuế suất VAT";
            point = new Point(0x6d, 0x7d);
            this.TxtKichThuoc.Location = point;
            this.TxtKichThuoc.Name = "TxtKichThuoc";
            size = new Size(0x11b, 20);
            this.TxtKichThuoc.Size = size;
            this.TxtKichThuoc.TabIndex = 9;
            this.Label20.AutoSize = true;
            point = new Point(8, 0x80);
            this.Label20.Location = point;
            this.Label20.Name = "Label20";
            size = new Size(0x24, 13);
            this.Label20.Size = size;
            this.Label20.TabIndex = 8;
            this.Label20.Text = "Model";
            this.Label19.AutoSize = true;
            point = new Point(0x1a5, 0x66);
            this.Label19.Location = point;
            this.Label19.Name = "Label19";
            size = new Size(0x55, 13);
            this.Label19.Size = size;
            this.Label19.TabIndex = 0x12;
            this.Label19.Text = "Trọng lượng (kg)";
            this.RdoThanhpham.AutoSize = true;
            this.RdoThanhpham.Checked = true;
            point = new Point(0xe7, 0xd7);
            this.RdoThanhpham.Location = point;
            this.RdoThanhpham.Name = "RdoThanhpham";
            size = new Size(0x55, 0x11);
            this.RdoThanhpham.Size = size;
            this.RdoThanhpham.TabIndex = 13;
            this.RdoThanhpham.TabStop = true;
            this.RdoThanhpham.Text = "Th\x00e0nh phẩm";
            this.RdoThanhpham.UseVisualStyleBackColor = true;
            this.RdoNguyenlieu.AutoSize = true;
            point = new Point(0x6d, 0xd7);
            this.RdoNguyenlieu.Location = point;
            this.RdoNguyenlieu.Name = "RdoNguyenlieu";
            size = new Size(0x51, 0x11);
            this.RdoNguyenlieu.Size = size;
            this.RdoNguyenlieu.TabIndex = 12;
            this.RdoNguyenlieu.Text = "Nguy\x00ean liệu";
            this.RdoNguyenlieu.UseVisualStyleBackColor = true;
            this.Label14.AutoSize = true;
            point = new Point(0x1a5, 0x1a);
            this.Label14.Location = point;
            this.Label14.Name = "Label14";
            size = new Size(0x63, 13);
            this.Label14.Size = size;
            this.Label14.TabIndex = 12;
            this.Label14.Text = "Thời gian bảo h\x00e0nh";
            this.Label13.AutoSize = true;
            point = new Point(0x1a5, 0x80);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x42, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 20;
            this.Label13.Text = "Tồn tối thiểu";
            this.CboDVT.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboDVT.FormattingEnabled = true;
            point = new Point(0x6d, 0x97);
            this.CboDVT.Location = point;
            this.CboDVT.Name = "CboDVT";
            size = new Size(0x11b, 0x15);
            this.CboDVT.Size = size;
            this.CboDVT.TabIndex = 11;
            this.Label6.AutoSize = true;
            point = new Point(6, 0x67);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x5d, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 6;
            this.Label6.Text = "T\x00e0i khoản gi\x00e1 vốn";
            this.Label5.AutoSize = true;
            point = new Point(6, 0x4e);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x67, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 4;
            this.Label5.Text = "T\x00e0i khoản h\x00e0ng h\x00f3a";
            this.Label23.AutoSize = true;
            point = new Point(0x1a5, 0x4d);
            this.Label23.Location = point;
            this.Label23.Name = "Label23";
            size = new Size(0x6d, 13);
            this.Label23.Size = size;
            this.Label23.TabIndex = 0x10;
            this.Label23.Text = "Thuế suất nhập khẩu";
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.LinkLabel5);
            this.GroupBox1.Controls.Add(this.LinkLabel3);
            this.GroupBox1.Controls.Add(this.CmdRemoveImage);
            this.GroupBox1.Controls.Add(this.browseImageButton);
            this.GroupBox1.Controls.Add(this.ImgPicture);
            this.GroupBox1.Controls.Add(this.OptDichVu);
            this.GroupBox1.Controls.Add(this.OptHangHoa);
            this.GroupBox1.Controls.Add(this.Label7);
            this.GroupBox1.Controls.Add(this.TxtMaHang);
            this.GroupBox1.Controls.Add(this.pictBarcode);
            this.GroupBox1.Controls.Add(this.CboNganhHang);
            this.GroupBox1.Controls.Add(this.Label22);
            this.GroupBox1.Controls.Add(this.TxtMaThueNhapKhau);
            this.GroupBox1.Controls.Add(this.Label11);
            this.GroupBox1.Controls.Add(this.TxtMaVach);
            this.GroupBox1.Controls.Add(this.CboNhomHangHoa);
            this.GroupBox1.Controls.Add(this.Label4);
            this.GroupBox1.Controls.Add(this.TxtDienGiai);
            this.GroupBox1.Controls.Add(this.Label3);
            this.GroupBox1.Controls.Add(this.TxtTenAnh);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Controls.Add(this.TxtTenViet);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.TxtMa);
            point = new Point(3, 3);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(740, 0xf9);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "Th\x00f4ng tin h\x00e0ng h\x00f3a";
            this.LinkLabel5.AutoSize = true;
            point = new Point(7, 0x29);
            this.LinkLabel5.Location = point;
            this.LinkLabel5.Name = "LinkLabel5";
            size = new Size(0x42, 13);
            this.LinkLabel5.Size = size;
            this.LinkLabel5.TabIndex = 4;
            this.LinkLabel5.TabStop = true;
            this.LinkLabel5.Text = "Ng\x00e0nh h\x00e0ng";
            this.LinkLabel3.AutoSize = true;
            point = new Point(0x178, 0x2a);
            this.LinkLabel3.Location = point;
            this.LinkLabel3.Name = "LinkLabel3";
            size = new Size(0x3e, 13);
            this.LinkLabel3.Size = size;
            this.LinkLabel3.TabIndex = 4;
            this.LinkLabel3.TabStop = true;
            this.LinkLabel3.Text = "Nh\x00f3m h\x00e0ng";
            point = new Point(650, 0x42);
            this.CmdRemoveImage.Location = point;
            this.CmdRemoveImage.Name = "CmdRemoveImage";
            size = new Size(70, 0x17);
            this.CmdRemoveImage.Size = size;
            this.CmdRemoveImage.TabIndex = 0x15;
            this.CmdRemoveImage.Text = "Remove";
            point = new Point(0x23d, 0x42);
            this.browseImageButton.Location = point;
            this.browseImageButton.Name = "browseImageButton";
            size = new Size(70, 0x17);
            this.browseImageButton.Size = size;
            this.browseImageButton.TabIndex = 20;
            this.browseImageButton.Text = "Add image";
            this.ImgPicture.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0x22e, 0x5d);
            this.ImgPicture.Location = point;
            this.ImgPicture.Name = "ImgPicture";
            size = new Size(0xb0, 0x97);
            this.ImgPicture.Size = size;
            this.ImgPicture.SizeMode = PictureBoxSizeMode.StretchImage;
            this.ImgPicture.TabIndex = 0x4c;
            this.ImgPicture.TabStop = false;
            this.OptDichVu.AutoSize = true;
            point = new Point(230, 0x10);
            this.OptDichVu.Location = point;
            this.OptDichVu.Name = "OptDichVu";
            size = new Size(0x3e, 0x11);
            this.OptDichVu.Size = size;
            this.OptDichVu.TabIndex = 1;
            this.OptDichVu.Text = "Dịch vụ";
            this.OptDichVu.UseVisualStyleBackColor = true;
            this.OptDichVu.Visible = false;
            this.OptHangHoa.AutoSize = true;
            this.OptHangHoa.Checked = true;
            point = new Point(0x6c, 0x10);
            this.OptHangHoa.Location = point;
            this.OptHangHoa.Name = "OptHangHoa";
            size = new Size(0x48, 0x11);
            this.OptHangHoa.Size = size;
            this.OptHangHoa.TabIndex = 0;
            this.OptHangHoa.TabStop = true;
            this.OptHangHoa.Text = "H\x00e0ng h\x00f3a";
            this.OptHangHoa.UseVisualStyleBackColor = true;
            this.OptHangHoa.Visible = false;
            this.Label7.AutoSize = true;
            point = new Point(6, 0x5c);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x4f, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 8;
            this.Label7.Text = "M\x00e3 (theo h\x00e3ng)";
            point = new Point(0x6c, 0x59);
            this.TxtMaHang.Location = point;
            this.TxtMaHang.Name = "TxtMaHang";
            size = new Size(0x86, 20);
            this.TxtMaHang.Size = size;
            this.TxtMaHang.TabIndex = 9;
            this.pictBarcode.BorderStyle = BorderStyle.FixedSingle;
            point = new Point(0x10b, 0x41);
            this.pictBarcode.Location = point;
            this.pictBarcode.Name = "pictBarcode";
            size = new Size(0xfc, 0x2d);
            this.pictBarcode.Size = size;
            this.pictBarcode.SizeMode = PictureBoxSizeMode.StretchImage;
            this.pictBarcode.TabIndex = 0x49;
            this.pictBarcode.TabStop = false;
            this.CboNganhHang.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboNganhHang.FormattingEnabled = true;
            point = new Point(0x6c, 0x26);
            this.CboNganhHang.Location = point;
            this.CboNganhHang.Name = "CboNganhHang";
            size = new Size(0xeb, 0x15);
            this.CboNganhHang.Size = size;
            this.CboNganhHang.TabIndex = 3;
            this.Label22.AutoSize = true;
            point = new Point(7, 0x76);
            this.Label22.Location = point;
            this.Label22.Name = "Label22";
            size = new Size(0x4c, 13);
            this.Label22.Size = size;
            this.Label22.TabIndex = 10;
            this.Label22.Text = "M\x00e3 nhập khẩu";
            point = new Point(0x6c, 0x73);
            this.TxtMaThueNhapKhau.Location = point;
            this.TxtMaThueNhapKhau.Name = "TxtMaThueNhapKhau";
            size = new Size(0x86, 20);
            this.TxtMaThueNhapKhau.Size = size;
            this.TxtMaThueNhapKhau.TabIndex = 11;
            this.Label11.AutoSize = true;
            point = new Point(0x11d, 0x76);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x31, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 12;
            this.Label11.Text = "M\x00e3 vạch";
            point = new Point(0x16e, 0x73);
            this.TxtMaVach.Location = point;
            this.TxtMaVach.Name = "TxtMaVach";
            size = new Size(0x99, 20);
            this.TxtMaVach.Size = size;
            this.TxtMaVach.TabIndex = 13;
            this.CboNhomHangHoa.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboNhomHangHoa.FormattingEnabled = true;
            point = new Point(0x1c3, 0x27);
            this.CboNhomHangHoa.Location = point;
            this.CboNhomHangHoa.Name = "CboNhomHangHoa";
            size = new Size(0xfc, 0x15);
            this.CboNhomHangHoa.Size = size;
            this.CboNhomHangHoa.TabIndex = 5;
            this.Label4.AutoSize = true;
            point = new Point(8, 0xc0);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x30, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x12;
            this.Label4.Text = "Diễn giải";
            point = new Point(0x6c, 0xbd);
            this.TxtDienGiai.Location = point;
            this.TxtDienGiai.Multiline = true;
            this.TxtDienGiai.Name = "TxtDienGiai";
            size = new Size(0x19b, 0x37);
            this.TxtDienGiai.Size = size;
            this.TxtDienGiai.TabIndex = 0x13;
            this.Label3.AutoSize = true;
            point = new Point(6, 0xa8);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x54, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x10;
            this.Label3.Text = "T\x00ean (Tiếng Anh)";
            point = new Point(0x6c, 0xa5);
            this.TxtTenAnh.Location = point;
            this.TxtTenAnh.Name = "TxtTenAnh";
            size = new Size(0x19b, 20);
            this.TxtTenAnh.Size = size;
            this.TxtTenAnh.TabIndex = 0x11;
            this.Label2.AutoSize = true;
            point = new Point(6, 0x8f);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x53, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 14;
            this.Label2.Text = "T\x00ean (Tiếng Việt)";
            point = new Point(0x6c, 140);
            this.TxtTenViet.Location = point;
            this.TxtTenViet.Name = "TxtTenViet";
            size = new Size(0x19b, 20);
            this.TxtTenViet.Size = size;
            this.TxtTenViet.TabIndex = 15;
            this.Label1.AutoSize = true;
            point = new Point(6, 0x41);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x19, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 6;
            this.Label1.Text = "M\x00e3 ";
            point = new Point(0x6c, 0x41);
            this.TxtMa.Location = point;
            this.TxtMa.Name = "TxtMa";
            size = new Size(0x86, 20);
            this.TxtMa.Size = size;
            this.TxtMa.TabIndex = 7;
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.CmdHelp });
            point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            size = new Size(0x2ed, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0x16;
            this.ToolStrip1.Text = "ToolStrip1";
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x52, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2f, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x39, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x4d, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdFind.Visible = false;
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.CmdPrint.Visible = false;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2f, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x3a, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdHelp.Image = (Image) manager.GetObject("CmdHelp.Image");
            this.CmdHelp.ImageTransparentColor = Color.White;
            this.CmdHelp.Name = "CmdHelp";
            size = new Size(0x48, 0x16);
            this.CmdHelp.Size = size;
            this.CmdHelp.Text = "Trợ gi\x00fap";
            this.browseImageOpenFileDialog.FileName = "OpenFileDialog1";
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab1.Dock = DockStyle.Fill;
            point = new Point(0, 0x19);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            this.C1DockingTab1.SelectedIndex = 2;
            size = new Size(0x2ed, 0x1ce);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 0x17;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.GroupBox4);
            this.C1DockingTabPage1.Controls.Add(this.GroupBox1);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(0x2eb, 0x1b4);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Th\x00f4ng tin chi tiết";
            this.C1DockingTabPage2.Controls.Add(this.GroupBox5);
            this.C1DockingTabPage2.Controls.Add(this.GroupBox3);
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(0x2eb, 0x1b4);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 1;
            this.C1DockingTabPage2.Text = "Đơn vị t\x00ednh - Gi\x00e1 b\x00e1n";
            this.AdvTKGiaVon.Conditions = "";
            this.AdvTKGiaVon.DefaultValue = "";
            this.AdvTKGiaVon.FieldNameFilter = "LEFT(SoTaiKhoan,1)";
            this.AdvTKGiaVon.KeyFilter = "6";
            point = new Point(0x6d, 100);
            this.AdvTKGiaVon.Location = point;
            padding = new Padding(0);
            this.AdvTKGiaVon.Margin = padding;
            this.AdvTKGiaVon.Name = "AdvTKGiaVon";
            this.AdvTKGiaVon.OnlyDigit = false;
            this.AdvTKGiaVon.ReadOnly = false;
            size = new Size(0x11b, 20);
            this.AdvTKGiaVon.Size = size;
            this.AdvTKGiaVon.TabIndex = 7;
            this.AdvTKGiaVon.UpperText = true;
            this.AdvTKGiaVon.Value = "";
            this.AdvTKGiaVon.WithCode = 80;
            this.AdvTKHangHoa.Conditions = "";
            this.AdvTKHangHoa.DefaultValue = "";
            this.AdvTKHangHoa.FieldNameFilter = "LEFT(SoTaiKhoan,3)";
            this.AdvTKHangHoa.KeyFilter = "152|154|155|156|157|158";
            point = new Point(0x6d, 0x4b);
            this.AdvTKHangHoa.Location = point;
            padding = new Padding(0);
            this.AdvTKHangHoa.Margin = padding;
            this.AdvTKHangHoa.Name = "AdvTKHangHoa";
            this.AdvTKHangHoa.OnlyDigit = true;
            this.AdvTKHangHoa.ReadOnly = false;
            size = new Size(0x11b, 20);
            this.AdvTKHangHoa.Size = size;
            this.AdvTKHangHoa.TabIndex = 5;
            this.AdvTKHangHoa.UpperText = true;
            this.AdvTKHangHoa.Value = "";
            this.AdvTKHangHoa.WithCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x2ed, 0x1e7);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.ToolStrip1);
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.KeyPreview = true;
            this.Name = "Frm_HangHoa";
            this.ShowIcon = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "DM-0003";
            this.Text = "DANH MUC HANG HOA";
            this.GroupBox5.ResumeLayout(false);
            this.VSGiaBan.EndInit();
            this.GroupBox3.ResumeLayout(false);
            this.VSDonViTinh.EndInit();
            this.GroupBox4.ResumeLayout(false);
            this.GroupBox4.PerformLayout();
            ((ISupportInitialize) this.TxtBaoHanh).EndInit();
            ((ISupportInitialize) this.TxttyLeThueNK).EndInit();
            ((ISupportInitialize) this.TxtTyLeThue).EndInit();
            ((ISupportInitialize) this.TxtTonToiThieu).EndInit();
            ((ISupportInitialize) this.TxtTrongLuong).EndInit();
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            ((ISupportInitialize) this.ImgPicture).EndInit();
            ((ISupportInitialize) this.pictBarcode).EndInit();
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            this.C1DockingTabPage2.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MyProject.Forms.Frm_DMHangSanXuat.Dispose();
            MyProject.Forms.Frm_DMHangSanXuat.ShowDialog();
            BuildComboModule.BuildCombo(this.CboHang, modGeneral.ListDanhMuc.HangSanXuat, true, "", "");
        }

        private void LinkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MyProject.Forms.Frm_DMQuocGia.Dispose();
            MyProject.Forms.Frm_DMQuocGia.ShowDialog();
            BuildComboModule.BuildCombo(this.CboXuatXu, modGeneral.ListDanhMuc.QuocGia, true, "", "");
        }

        private void LinkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MyProject.Forms.Frm_DMNhomHangHoa.Dispose();
            MyProject.Forms.Frm_DMNhomHangHoa.ShowDialog();
            string conditions = "";
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNganhHang.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
            {
                conditions = " KhoaNganh = '" + LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNganhHang.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() + "'";
            }
            BuildComboModule.BuildCombo(this.CboNhomHangHoa, modGeneral.ListDanhMuc.NhomHangHoa, true, conditions, "");
        }

        private void LinkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MyProject.Forms.Frm_DMDonViTinh.Dispose();
            MyProject.Forms.Frm_DMDonViTinh.ShowDialog();
            BuildComboModule.BuildCombo(this.CboDVT, modGeneral.ListDanhMuc.DonViTinh, false, "", "");
        }

        private void LinkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MyProject.Forms.Frm_DMNganhHang.Dispose();
            MyProject.Forms.Frm_DMNganhHang.ShowDialog();
            BuildComboModule.BuildCombo(this.CboDVT, modGeneral.ListDanhMuc.NganhHang, false, "", "");
        }

        public void LoadDonViTinh()
        {
            this.VSDonViTinh.Rows.Count = 1;
            this.VSDonViTinh.AddItem("");
            this.VSDonViTinh[this.VSDonViTinh.Rows.Count - 1, 0] = "";
            this.VSDonViTinh[this.VSDonViTinh.Rows.Count - 1, 1] = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboDVT.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            this.VSDonViTinh[this.VSDonViTinh.Rows.Count - 1, 2] = LVYModule.ReturnIfNull(this.CboDVT.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            this.VSDonViTinh[this.VSDonViTinh.Rows.Count - 1, 3] = 1;
            DataTable list = this.objDMCTDVT.GetList(this.cFrmKhoa);
            if ((list != null) && (list.Rows.Count != 0))
            {
                int num2 = list.Rows.Count - 1;
                for (int i = 0; i <= num2; i++)
                {
                    C1.Win.C1FlexGrid.C1FlexGrid vSDonViTinh = this.VSDonViTinh;
                    vSDonViTinh.AddItem("");
                    vSDonViTinh[vSDonViTinh.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(list.Rows[i]["Khoa"]);
                    vSDonViTinh[vSDonViTinh.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(list.Rows[i]["KhoaDonViTinh"]);
                    vSDonViTinh[vSDonViTinh.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(list.Rows[i][modGeneral.Tranlated("Ten", "")]);
                    vSDonViTinh[vSDonViTinh.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(list.Rows[i][modGeneral.Tranlated("HeSo", "")]);
                    vSDonViTinh[vSDonViTinh.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(list.Rows[i][modGeneral.Tranlated("DienGiai", "")]);
                    vSDonViTinh = null;
                }
            }
        }

        public void LoadGiaBan(string pKhoa)
        {
            DataTable listGiaBan = this.objHH.GetListGiaBan(pKhoa);
            int num = 0;
            this.VSGiaBan.Rows.Count = 1;
            C1.Win.C1FlexGrid.C1FlexGrid vSGiaBan = this.VSGiaBan;
            int num2 = listGiaBan.Rows.Count - 1;
            for (num = 0; num <= num2; num++)
            {
                vSGiaBan.AddItem("");
                vSGiaBan[vSGiaBan.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(listGiaBan.Rows[num]["KhoaLoaiGia"]);
                vSGiaBan[vSGiaBan.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(listGiaBan.Rows[num]["LoaiGia"]);
                vSGiaBan[vSGiaBan.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(listGiaBan.Rows[num]["GiaBan"]);
            }
            vSGiaBan = null;
        }

        public void LoadThuocTinh(string pKhoa)
        {
        }

        public void SetLanguage()
        {
            this.CmdAdd.Text = modGeneral.Tranlated(this.CmdAdd.Text, "");
            this.CmdEdit.Text = modGeneral.Tranlated(this.CmdEdit.Text, "");
            this.CmdDel.Text = modGeneral.Tranlated(this.CmdDel.Text, "");
            this.CmdSave.Text = modGeneral.Tranlated(this.CmdSave.Text, "");
            this.CmdUnsave.Text = modGeneral.Tranlated(this.CmdUnsave.Text, "");
            this.CmdPrint.Text = modGeneral.Tranlated(this.CmdPrint.Text, "");
            this.CmdExit.Text = modGeneral.Tranlated(this.CmdExit.Text, "");
            this.CmdAddRow.Text = modGeneral.Tranlated(this.CmdAddRow.Text, "");
            this.CmdDelRow.Text = modGeneral.Tranlated(this.CmdDelRow.Text, "");
            this.CmdHelp.Text = modGeneral.Tranlated(this.CmdHelp.Text, "");
            this.Label1.Text = modGeneral.Tranlated(this.Label1.Text, "");
            this.Label2.Text = modGeneral.Tranlated(this.Label2.Text, "");
            this.Label3.Text = modGeneral.Tranlated(this.Label3.Text, "");
            this.Label4.Text = modGeneral.Tranlated(this.Label4.Text, "");
            this.Label5.Text = modGeneral.Tranlated(this.Label5.Text, "");
            this.Label6.Text = modGeneral.Tranlated(this.Label6.Text, "");
            this.Label13.Text = modGeneral.Tranlated(this.Label13.Text, "");
            this.Label14.Text = modGeneral.Tranlated(this.Label14.Text, "");
            this.CKActive.Text = modGeneral.Tranlated(this.CKActive.Text, "");
            this.RdoNguyenlieu.Text = modGeneral.Tranlated(this.RdoNguyenlieu.Text, "");
            this.RdoThanhpham.Text = modGeneral.Tranlated(this.RdoThanhpham.Text, "");
            this.GroupBox1.Text = modGeneral.Tranlated(this.GroupBox1.Text, "");
        }

        public void ShowData(string pKhoa)
        {
            clsDMHangHoa objHH = this.objHH;
            objHH.Load(pKhoa);
            this.cFrmKhoa = pKhoa;
            this.CboNganhHang.SelectedValue = objHH.KhoaNganh;
            this.CboNhomHangHoa.SelectedValue = objHH.KhoaNhom;
            this.TxtMa.Text = objHH.Ma.Trim();
            this.TxtMaVach.Text = objHH.MaVach.Trim();
            this.TxtTenViet.Text = objHH.TenViet;
            this.TxtTenAnh.Text = objHH.TenAnh;
            this.TxtDienGiai.Text = objHH.DienGiai;
            this.CboDVT.SelectedValue = objHH.KhoaDonViTinh;
            this.CboHang.SelectedValue = objHH.KhoaHangSanXuat;
            this.TxtTonToiThieu.Value = objHH.SoLuongTonToiThieu;
            this.CboHang.SelectedValue = objHH.KhoaHangSanXuat;
            this.TxtBaoHanh.Value = objHH.ThoiGianBaoHanh;
            this.TxtTrongLuong.Value = objHH.TrongLuong;
            this.TxtKichThuoc.Text = objHH.ThongSoKythuat;
            this.TxtTyLeThue.Value = objHH.TyLeThue;
            this.TxtMaThueNhapKhau.Text = objHH.MaHangNhapKhau;
            this.CboXuatXu.SelectedValue = objHH.KhoaQuocGia;
            this.TxttyLeThueNK.Value = objHH.TyLeThueNhapKhau;
            this.TxtMaHang.Text = objHH.MaTheoHang.Trim();
            if (objHH.NguyenLieu == 1)
            {
                this.RdoNguyenlieu.Checked = true;
            }
            else
            {
                this.RdoThanhpham.Checked = true;
            }
            this.AdvTKHangHoa.Value = objHH.KhoaTKHangHoa;
            this.AdvTKGiaVon.Value = objHH.KhoaTKGiaVon;
            this.CKActive.CheckState = (CheckState) objHH.Active;
            this.CKBaoHanh.CheckState = (CheckState) objHH.TheoDoiBaoHanh;
            if (LVYModule.ReturnIfNull(objHH.Loai, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "DV")
            {
                this.OptDichVu.Checked = true;
            }
            else
            {
                this.OptDichVu.Checked = false;
            }
            if (objHH.Img != null)
            {
                MemoryStream stream = new MemoryStream(objHH.Img);
                PictureBox imgPicture = this.ImgPicture;
                imgPicture.Image = Image.FromStream(stream);
                imgPicture.SizeMode = PictureBoxSizeMode.StretchImage;
                imgPicture = null;
            }
            objHH = null;
            this.LoadDonViTinh();
            this.LoadGiaBan(this.cFrmKhoa);
            this.LoadThuocTinh(this.cFrmKhoa);
        }

        private void TxtMa_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.KeyChar = Conversions.ToChar(e.KeyChar.ToString().ToUpper());
        }

        private void TxtMaVach_TextChanged(object sender, EventArgs e)
        {
            if (this.TxtMaVach.Text.Trim() == "")
            {
                this.pictBarcode.Image = null;
            }
            else if (this.TxtMaVach.Text.Trim().Length >= 2)
            {
                this.MyImg = Code128Rendering.MakeBarcodeImage(this.TxtMaVach.Text.Trim(), 1, true, 50);
                this.pictBarcode.Image = this.MyImg;
            }
        }

        private void VSDonViTinh_DoubleClick(object sender, EventArgs e)
        {
            if (((this.VSDonViTinh.Rows.Count != 1) && (this.VSDonViTinh.Row > 0)) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSDonViTinh[this.VSDonViTinh.Row, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != ""))
            {
                MyProject.Forms.Frm_AddDonViTinh.cFrmKhoa = Conversions.ToString(this.VSDonViTinh[this.VSDonViTinh.Row, 0]);
                MyProject.Forms.Frm_AddDonViTinh.cFrmKhoaHangHoa = this.cFrmKhoa;
                MyProject.Forms.Frm_AddDonViTinh.ShowDialog();
                this.LoadDonViTinh();
            }
        }

        private void VSGiaBan_AfterEdit(object sender, RowColEventArgs e)
        {
            clsGiaBan ban = new clsGiaBan();
            clsGiaBan ban2 = ban;
            ban2.KhoaHangHoa = this.cFrmKhoa;
            ban2.KhoaLoaiGia = Conversions.ToString(this.VSGiaBan[e.Row, 0]);
            ban2.GiaBan = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSGiaBan[e.Row, 2]), 0, modGeneral.TypeOfValue.Nothing));
            ban2.KhoaNhanVienCapNhat = modGeneral.H_USERID;
            ban2.NgayBatDau = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            ban2.SaveData();
            ban2 = null;
        }

        private void VSGiaBan_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (this.mEnabledControl)
            {
                e.Cancel = true;
            }
            else if (e.Col < 2)
            {
                e.Cancel = true;
            }
        }

        internal virtual ADVAccount AdvTKGiaVon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKGiaVon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKGiaVon = value;
            }
        }

        internal virtual ADVAccount AdvTKHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKHangHoa = value;
            }
        }

        internal virtual Button browseImageButton
        {
            [DebuggerNonUserCode]
            get
            {
                return this._browseImageButton;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.browseImageButton_Click);
                if (this._browseImageButton != null)
                {
                    this._browseImageButton.Click -= handler;
                }
                this._browseImageButton = value;
                if (this._browseImageButton != null)
                {
                    this._browseImageButton.Click += handler;
                }
            }
        }

        internal virtual OpenFileDialog browseImageOpenFileDialog
        {
            [DebuggerNonUserCode]
            get
            {
                return this._browseImageOpenFileDialog;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._browseImageOpenFileDialog = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.C1DockingTab1_SelectedIndexChanged);
                if (this._C1DockingTab1 != null)
                {
                    this._C1DockingTab1.SelectedIndexChanged -= handler;
                }
                this._C1DockingTab1 = value;
                if (this._C1DockingTab1 != null)
                {
                    this._C1DockingTab1.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual ComboBox CboDVT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboDVT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboDVT = value;
            }
        }

        internal virtual ComboBox CboHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboHang = value;
            }
        }

        internal virtual ComboBox CboNganhHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboNganhHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboNganhHang_SelectedIndexChanged);
                if (this._CboNganhHang != null)
                {
                    this._CboNganhHang.SelectedIndexChanged -= handler;
                }
                this._CboNganhHang = value;
                if (this._CboNganhHang != null)
                {
                    this._CboNganhHang.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboNhomHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboNhomHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboNhomHangHoa_SelectedIndexChanged);
                if (this._CboNhomHangHoa != null)
                {
                    this._CboNhomHangHoa.SelectedIndexChanged -= handler;
                }
                this._CboNhomHangHoa = value;
                if (this._CboNhomHangHoa != null)
                {
                    this._CboNhomHangHoa.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboXuatXu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboXuatXu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboXuatXu = value;
            }
        }

        internal virtual CheckBox CKActive
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CKActive;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CKActive = value;
            }
        }

        internal virtual CheckBox CKBaoHanh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CKBaoHanh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CKBaoHanh = value;
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual Button CmdAddRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddRow_Click);
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click -= handler;
                }
                this._CmdAddRow = value;
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual Button CmdDelRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDelRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDelRow_Click);
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click -= handler;
                }
                this._CmdDelRow = value;
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click += handler;
                }
            }
        }

        internal virtual Button CmdDMGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDMGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDMGia_Click);
                if (this._CmdDMGia != null)
                {
                    this._CmdDMGia.Click -= handler;
                }
                this._CmdDMGia = value;
                if (this._CmdDMGia != null)
                {
                    this._CmdDMGia.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdFind = value;
            }
        }

        internal virtual ToolStripButton CmdHelp
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdHelp;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdHelp_Click);
                if (this._CmdHelp != null)
                {
                    this._CmdHelp.Click -= handler;
                }
                this._CmdHelp = value;
                if (this._CmdHelp != null)
                {
                    this._CmdHelp.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdPrint_Click);
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click -= handler;
                }
                this._CmdPrint = value;
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click += handler;
                }
            }
        }

        internal virtual Button CmdRemoveImage
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdRemoveImage;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdRemoveImage_Click);
                if (this._CmdRemoveImage != null)
                {
                    this._CmdRemoveImage.Click -= handler;
                }
                this._CmdRemoveImage = value;
                if (this._CmdRemoveImage != null)
                {
                    this._CmdRemoveImage.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        public bool EnableControl
        {
            get
            {
                return this.mEnabledControl;
            }
            set
            {
                this.mEnabledControl = value;
                this.CboNganhHang.Enabled = value;
                this.TxtMa.ReadOnly = !value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.TxtMaVach.ReadOnly = !value;
                this.TxtTenViet.ReadOnly = !value;
                this.TxtTenAnh.ReadOnly = !value;
                this.TxtDienGiai.ReadOnly = !value;
                this.AdvTKHangHoa.ReadOnly = !value;
                this.AdvTKGiaVon.ReadOnly = !value;
                this.RdoNguyenlieu.Enabled = value;
                this.RdoThanhpham.Enabled = value;
                this.CKActive.Enabled = value;
                this.CboNhomHangHoa.Enabled = value;
                this.CboDVT.Enabled = value;
                this.TxtBaoHanh.ReadOnly = !value;
                this.TxtTrongLuong.Enabled = value;
                this.TxtKichThuoc.ReadOnly = !value;
                this.TxtTonToiThieu.ReadOnly = !value;
                this.TxtMaThueNhapKhau.ReadOnly = !value;
                this.CboXuatXu.Enabled = value;
                this.TxttyLeThueNK.ReadOnly = !value;
                this.TxtTyLeThue.Enabled = value;
                this.CmdAddRow.Enabled = !value;
                this.CmdDelRow.Enabled = !value;
                this.CboHang.Enabled = value;
                this.VSDonViTinh.Enabled = !value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdPrint.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CKBaoHanh.Enabled = value;
                this.TxtMaHang.ReadOnly = !value;
                this.OptDichVu.Enabled = value;
                this.OptHangHoa.Enabled = value;
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual GroupBox GroupBox3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox3 = value;
            }
        }

        internal virtual GroupBox GroupBox4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox4 = value;
            }
        }

        internal virtual GroupBox GroupBox5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox5 = value;
            }
        }

        internal virtual PictureBox ImgPicture
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ImgPicture;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ImgPicture = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label14
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label14;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label14 = value;
            }
        }

        internal virtual Label Label19
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label19;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label19 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label20
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label20;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label20 = value;
            }
        }

        internal virtual Label Label21
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label21;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label21 = value;
            }
        }

        internal virtual Label Label22
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label22;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label22 = value;
            }
        }

        internal virtual Label Label23
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label23;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label23 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual LinkLabel LinkLabel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._LinkLabel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                LinkLabelLinkClickedEventHandler handler = new LinkLabelLinkClickedEventHandler(this.LinkLabel1_LinkClicked);
                if (this._LinkLabel1 != null)
                {
                    this._LinkLabel1.LinkClicked -= handler;
                }
                this._LinkLabel1 = value;
                if (this._LinkLabel1 != null)
                {
                    this._LinkLabel1.LinkClicked += handler;
                }
            }
        }

        internal virtual LinkLabel LinkLabel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._LinkLabel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                LinkLabelLinkClickedEventHandler handler = new LinkLabelLinkClickedEventHandler(this.LinkLabel2_LinkClicked);
                if (this._LinkLabel2 != null)
                {
                    this._LinkLabel2.LinkClicked -= handler;
                }
                this._LinkLabel2 = value;
                if (this._LinkLabel2 != null)
                {
                    this._LinkLabel2.LinkClicked += handler;
                }
            }
        }

        internal virtual LinkLabel LinkLabel3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._LinkLabel3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                LinkLabelLinkClickedEventHandler handler = new LinkLabelLinkClickedEventHandler(this.LinkLabel3_LinkClicked);
                if (this._LinkLabel3 != null)
                {
                    this._LinkLabel3.LinkClicked -= handler;
                }
                this._LinkLabel3 = value;
                if (this._LinkLabel3 != null)
                {
                    this._LinkLabel3.LinkClicked += handler;
                }
            }
        }

        internal virtual LinkLabel LinkLabel4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._LinkLabel4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                LinkLabelLinkClickedEventHandler handler = new LinkLabelLinkClickedEventHandler(this.LinkLabel4_LinkClicked);
                if (this._LinkLabel4 != null)
                {
                    this._LinkLabel4.LinkClicked -= handler;
                }
                this._LinkLabel4 = value;
                if (this._LinkLabel4 != null)
                {
                    this._LinkLabel4.LinkClicked += handler;
                }
            }
        }

        internal virtual LinkLabel LinkLabel5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._LinkLabel5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                LinkLabelLinkClickedEventHandler handler = new LinkLabelLinkClickedEventHandler(this.LinkLabel5_LinkClicked);
                if (this._LinkLabel5 != null)
                {
                    this._LinkLabel5.LinkClicked -= handler;
                }
                this._LinkLabel5 = value;
                if (this._LinkLabel5 != null)
                {
                    this._LinkLabel5.LinkClicked += handler;
                }
            }
        }

        internal virtual RadioButton OptDichVu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OptDichVu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OptDichVu = value;
            }
        }

        internal virtual RadioButton OptHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OptHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OptHangHoa = value;
            }
        }

        internal virtual PictureBox pictBarcode
        {
            [DebuggerNonUserCode]
            get
            {
                return this._pictBarcode;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._pictBarcode = value;
            }
        }

        internal virtual RadioButton RdoNguyenlieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._RdoNguyenlieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._RdoNguyenlieu = value;
            }
        }

        internal virtual RadioButton RdoThanhpham
        {
            [DebuggerNonUserCode]
            get
            {
                return this._RdoThanhpham;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._RdoThanhpham = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual C1NumericEdit TxtBaoHanh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtBaoHanh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtBaoHanh = value;
            }
        }

        internal virtual TextBox TxtDienGiai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienGiai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDienGiai = value;
            }
        }

        internal virtual TextBox TxtKichThuoc
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtKichThuoc;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtKichThuoc = value;
            }
        }

        internal virtual TextBox TxtMa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                System.Windows.Forms.KeyPressEventHandler handler = new System.Windows.Forms.KeyPressEventHandler(this.TxtMa_KeyPress);
                if (this._TxtMa != null)
                {
                    this._TxtMa.KeyPress -= handler;
                }
                this._TxtMa = value;
                if (this._TxtMa != null)
                {
                    this._TxtMa.KeyPress += handler;
                }
            }
        }

        internal virtual TextBox TxtMaHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtMaHang = value;
            }
        }

        internal virtual TextBox TxtMaThueNhapKhau
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaThueNhapKhau;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtMaThueNhapKhau = value;
            }
        }

        internal virtual TextBox TxtMaVach
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaVach;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtMaVach_TextChanged);
                if (this._TxtMaVach != null)
                {
                    this._TxtMaVach.TextChanged -= handler;
                }
                this._TxtMaVach = value;
                if (this._TxtMaVach != null)
                {
                    this._TxtMaVach.TextChanged += handler;
                }
            }
        }

        internal virtual TextBox TxtTenAnh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenAnh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenAnh = value;
            }
        }

        internal virtual TextBox TxtTenViet
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenViet;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenViet = value;
            }
        }

        internal virtual C1NumericEdit TxtTonToiThieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTonToiThieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTonToiThieu = value;
            }
        }

        internal virtual C1NumericEdit TxtTrongLuong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTrongLuong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTrongLuong = value;
            }
        }

        internal virtual C1NumericEdit TxtTyLeThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTyLeThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTyLeThue = value;
            }
        }

        internal virtual C1NumericEdit TxttyLeThueNK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxttyLeThueNK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxttyLeThueNK = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSDonViTinh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSDonViTinh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.VSDonViTinh_DoubleClick);
                if (this._VSDonViTinh != null)
                {
                    this._VSDonViTinh.DoubleClick -= handler;
                }
                this._VSDonViTinh = value;
                if (this._VSDonViTinh != null)
                {
                    this._VSDonViTinh.DoubleClick += handler;
                }
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSGiaBan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSGiaBan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSGiaBan_BeforeEdit);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSGiaBan_AfterEdit);
                if (this._VSGiaBan != null)
                {
                    this._VSGiaBan.BeforeEdit -= handler;
                    this._VSGiaBan.AfterEdit -= handler2;
                }
                this._VSGiaBan = value;
                if (this._VSGiaBan != null)
                {
                    this._VSGiaBan.BeforeEdit += handler;
                    this._VSGiaBan.AfterEdit += handler2;
                }
            }
        }
    }
}

